<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Student List</title>
</head>
<body>
<form action="/list" method = "post">
    <label>Name:</label>
    <input type="text" name="name">

    <label>Age:</label>
    <input type="text" name="age">
    <input type="submit" value="search">
</form>
<table border="1">

    <tr>
        <td>ID</td>
        <td>Name</td>
        <td>Age</td>
        <td>Action</td>
    </tr>
    <tr th:each="student:${studentList}">
        <td th:text="${student.id}"></td>
        <td th:text="${student.name}"></td>
        <td th:text="${student.age}"></td>
        <td>
            <a th:href="@{/delete/{id}(id=${student.id})}">Delete</a>
            <a th:href="@{/update/{id}(id=${student.id})}">Update</a>
        </td>

    </tr>
</table>
<div>
    <a href="/create">Create</a>
</div>
</body>
</html>